
#include "merge.h"

#define g() printf("%d: GPIOA=%#X\r\n", __LINE__, GPIO_ReadInputData(GPIOA))

int main() {

    printf_init(9600);
    delay_init();

    delay_s(10);
    p();

    OLED_init();

    p();
    OLED_clear();
    p();
    // OLED_white_screen();
    // char h[] = "Hello World";
    // OLED_draw_string(0, 0, h, strlen(h));
    // char n[] = "TOMCAT Linking";
    // OLED_draw_string(1, 0, n, strlen(n));
    // int hqyj[] = {0, 1, 2, 3};
    // OLED_draw_hanzi(1, 2, hqyj, sizeof(hqyj) / sizeof(int));

    // int z[] = {4, 5};
    // OLED_draw_hanzi(3, 2, z, sizeof(z) / sizeof(int));

    // OK
    //  for(int i=0;i<8;i++){
    //      for(int j=0;j<16;j++){
    //          OLED_set_pixel(5+i,16+j,1);
    //      }
    //  }
    // OLED_set_all_bytes(0x80);
    // p();

    int z[] = {4, 5};
    OLED_draw_hanzi(3, 2, z, sizeof(z) / sizeof(int));
    char s[] = "Hello World!!!!!";
    OLED_draw_string(1, 0, s, strlen(s));
    p();
	int z2[] = {0,1,2,3,4,5,0,1,2};
    OLED_draw_hanzi(0, 0, z2, sizeof(z2) / sizeof(int));
    while (true) {

        printf("main running\r\n");

        // OLED_show_screen();

        delay_s(2);
    }

    return 0;
}
